-
Notifications
You must be signed in to change notification settings - Fork 1.3k
API to list console sessions #11016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API to list console sessions #11016
Conversation
|
@blueorangutan package |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11016 +/- ##
============================================
+ Coverage 17.35% 17.37% +0.02%
- Complexity 15189 15222 +33
============================================
Files 5883 5885 +2
Lines 524514 524820 +306
Branches 64007 64026 +19
============================================
+ Hits 91013 91196 +183
- Misses 423216 423336 +120
- Partials 10285 10288 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13755 |
79f6d2d to
ad7af57
Compare
|
@blueorangutan package |
|
@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm, only doubt, is the active parameter needed? would we ever want to list no longer available sessions?
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13766 |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13771 |
|
@DaanHoogland, thanks for the review!
Yes, listing removed sessions is useful for audit and analysis purposes, as it allows users to track who generated a console endpoint, who accessed it, and when it was generated, acquired, and removed. Listing only active sessions, on the other hand, is helpful for verifying whether someone is currently using a VM. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13777 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13527)
|
|
@blueorangutan test ol8 vmware-70u3 keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests |
…leproxy/ListConsoleSessionsCmd.java Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
…eAccessManagerImpl.java Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
cbd4295 to
dcece22
Compare
|
@blueorangutan package |
|
@sureshanaparti, can we merge this one? |
|
@blueorangutan package |
@bernardodemarco will check the build and merge |
Ok, thanks! |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14506 |
|
Verified list consolesessions API call with latest build, looks good. |
* create API to list console sessions
Description
Currently, details about console sessions are stored in the
cloud.console_sessiontable in the database. Operators can only access this information by querying the database directly, while end users have no way to view console session data at all.To address this, this PR proposes to create the
listConsoleSessionsAPI. It allows listing the console sessions, with optional filters by domain, account, user, host, instance, IP address, and date. The API is accessible to all account types and, thus, performs proper access validation on the queried resources.The API supports the following parameters:
idactiveonlytrue. Active sessions are the ones that have been acquired and have not been removed.acquiredfalse. Acquired sessions are the ones that have been accessed. Theactiveonlyparameter has precedence over theacquiredparameter, i.e., when theactiveonlyparameter istrue, theacquiredparameter value will be ignored.isrecursivefalse.clientaddressconsoleendpointcreatoraddresshostidvirtualmachineidstartdateenddatedomainidaccountiduseridpagepagesize.pagesizepage.This PR only encompasses the creation of the API
listConsoleSessionsAPI. UI support will be implemented in a future PR.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
Tests Setup
listConsoleSessionstestsadminaccount, verified that the API lists console sessions correctly according to the specified parametersu1account, verified that it is only possible to access the account's console sessionsd2-adminaccount, verified that it is only possible to list the console sessions of thed2domaind1-adminaccount, verified that it is only possible to list the console sessions of thed1andd1/d1-d1domainsd1-useraccount, verified that it is only possible to list thed1-userconsole sessionsd1-d1-adminaccount, verified that it is only possible to list the console sessions of thed1/d1-d1domaind1-d1-useraccount, verified that it is only possible to list thed1-d1-userconsole sessionsUsertype, verified that thehostidparameter is not considered in the API workflowUsertype, verified that thehostidandhostnameresponse attributes are not included in the API's return